package com.shop.entity;

import java.util.Objects;

public class LookCartVO {

    private int u_id    ;// 用户id             | 不能为空
    private int sc_id   ;// 购物车id           | 不能为空
    private int sc_num  ;// 购物车商品总金额   | 不能为空
    private int sd_id   ;// 购物车详情id       | 不能为空
    private int gd_id   ;// 商品详情表id       | 不能为空
    private int sd_num  ;// 购物车详情商品数量 | 不能为空
    private double gd_price;// 商品单价           | 不能为空
    private int gd_num  ;// 商品数量           | 不能为空
    private int g_id    ;// 商品表id           | 不能为空
    private String g_name  ;// 商品名称           | 不能为空
    private int s_id    ;// 商家id             | 不能为空
    private double goods_total; //商品小计
    private String g_fourname; //商品四级分类
    private int img_id; //商品图片
    private int sd_state; //购物车中的商品的状态

    public LookCartVO() {
    }

    public LookCartVO(int u_id, int sc_id, int sc_num, int sd_id, int gd_id,
                      int sd_num, double gd_price, int gd_num, int g_id,
                      String g_name, int s_id, double goods_total) {
        this.u_id = u_id;
        this.sc_id = sc_id;
        this.sc_num = sc_num;
        this.sd_id = sd_id;
        this.gd_id = gd_id;
        this.sd_num = sd_num;
        this.gd_price = gd_price;
        this.gd_num = gd_num;
        this.g_id = g_id;
        this.g_name = g_name;
        this.s_id = s_id;
        this.goods_total = goods_total;
    }

    public int getU_id() {
        return u_id;
    }

    public void setU_id(int u_id) {
        this.u_id = u_id;
    }

    public int getSc_id() {
        return sc_id;
    }

    public void setSc_id(int sc_id) {
        this.sc_id = sc_id;
    }

    public int getSc_num() {
        return sc_num;
    }

    public void setSc_num(int sc_num) {
        this.sc_num = sc_num;
    }

    public int getSd_id() {
        return sd_id;
    }

    public void setSd_id(int sd_id) {
        this.sd_id = sd_id;
    }

    public int getGd_id() {
        return gd_id;
    }

    public void setGd_id(int gd_id) {
        this.gd_id = gd_id;
    }

    public int getSd_num() {
        return sd_num;
    }

    public void setSd_num(int sd_num) {
        this.sd_num = sd_num;
    }

    public double getGd_price() {
        return gd_price;
    }

    public void setGd_price(double gd_price) {
        this.gd_price = gd_price;
    }

    public int getGd_num() {
        return gd_num;
    }

    public void setGd_num(int gd_num) {
        this.gd_num = gd_num;
    }

    public int getG_id() {
        return g_id;
    }

    public void setG_id(int g_id) {
        this.g_id = g_id;
    }

    public String getG_name() {
        return g_name;
    }

    public void setG_name(String g_name) {
        this.g_name = g_name;
    }

    public int getS_id() {
        return s_id;
    }

    public void setS_id(int s_id) {
        this.s_id = s_id;
    }

    public double getGoods_total() {
        return goods_total;
    }

    public void setGoods_total(double goods_total) {
        this.goods_total = goods_total;
    }

    public String getG_fourname() {
        return g_fourname;
    }

    public void setG_fourname(String g_fourname) {
        this.g_fourname = g_fourname;
    }

    public int getImg_id() {
        return img_id;
    }

    public void setImg_id(int img_id) {
        this.img_id = img_id;
    }

    public int getSd_state() {
        return sd_state;
    }

    public void setSd_state(int sd_state) {
        this.sd_state = sd_state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LookCartVO that = (LookCartVO) o;
        return u_id == that.u_id &&
                sc_id == that.sc_id &&
                sc_num == that.sc_num &&
                sd_id == that.sd_id &&
                gd_id == that.gd_id &&
                sd_num == that.sd_num &&
                Double.compare(that.gd_price, gd_price) == 0 &&
                gd_num == that.gd_num &&
                g_id == that.g_id &&
                s_id == that.s_id &&
                Double.compare(that.goods_total, goods_total) == 0 &&
                Objects.equals(g_name, that.g_name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(u_id, sc_id, sc_num, sd_id, gd_id, sd_num, gd_price, gd_num, g_id, g_name, s_id, goods_total);
    }

    @Override
    public String toString() {
        return "LookCartVO{" +
                "u_id=" + u_id +
                ", sc_id=" + sc_id +
                ", sc_num=" + sc_num +
                ", sd_id=" + sd_id +
                ", gd_id=" + gd_id +
                ", sd_num=" + sd_num +
                ", gd_price=" + gd_price +
                ", gd_num=" + gd_num +
                ", g_id=" + g_id +
                ", g_name='" + g_name + '\'' +
                ", s_id=" + s_id +
                ", goods_total=" + goods_total +
                '}';
    }
}
